﻿using System;
using System.Collections.Generic;

namespace LayeredArchitectureSample.DomainModel
{
    // TODO: An Entity
    public interface ITripRepository
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="id"></param>
        /// <exception cref="CannotRemoveEntityException"></exception>
        void RemoveTrip(long id);

        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        /// <exception cref="CannotAddEntityException"></exception>
        /// <exception cref="ArgumentException"></exception>
        Trip AddNewTrip(Route route, IEnumerable<WareUnitsCounted> wares);

        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        /// <exception cref="ArgumentException"></exception>
        /// <exception cref="EntityRetrievalException"></exception>
        /// <exception cref="EntityNotFoundException"></exception>
        Trip GetTripById(long id);

        /// <exception cref="ArgumentException"></exception>
        /// <exception cref="EntityNotFoundException"></exception>
        /// <exception cref="FailedToUpdateEntityException"></exception>
        void PersistChanges(Trip trip);

        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        /// <exception cref="EntityRetrievalException"></exception>
        IEnumerable<Trip> GetAll();
    }
}